<?php
namespace Home\Model;
use Think\Model;
class AttrModel extends Model {

	protected $trueTableName = 'my_attr';
	private $field = 'id,cate_id,attr_name';

	public function getAttr($cate_id)
	{
		$field = $this->field;

		$where['cate_id'] = $cate_id;
		return $this->where($where)->field($field)->select();
	}

}